<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8" />
	<title></title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv=”X-UA-Compatible” content=”IE=edge,chrome=1″/>
	<link rel="stylesheet" type="text/css" href="../../css/defaultcss.css" />
	<link rel="stylesheet" type="text/css" href="../../css/amazeui.min.css" />
	<script type="text/javascript" src="../../js/jquery-1.9.1.min.js"></script>
	<script type="text/javascript" src="../../js/global.js"></script>
	<script type="text/javascript" src="../../layer/layer.js"></script>
	<script src='../../js/amazeui.min.js'></script>
	<script src='../../js/flex.js'></script>
	<script src='../../js/index.js'></script>
	<link rel="stylesheet" href="../../css/weui.min.css">
	<link rel="stylesheet" href="../../css/css/stylesheets/index.css">

</head>

<body>
	<header>
		<div class="goBack">
			<img src="../../img/base/back.png" alt="返回">
		</div>
		<span class="title"> 案件信息 </span>
	</header>
	<div class="content  case_detail">
		<div class="title">
			基本信息
		</div>
		<div class="detail_box">
			<ul class="detail_ul">
				<li>
					<div class="li_label">
						案件名称
					</div>
					<div class="li_detail" id='caseName'>
					</div>
				</li>
				<li>
					<div class="li_label">
						当事人名字
					</div>
					<div class="li_detail" id='party'>
					</div>
				</li>
				<li>
					<div class="li_label">
						案件类型
					</div>
					<div class="li_detail" id='caseType'>
					</div>
				</li>
				<li>
					<div class="li_label">
						承办人员
					</div>
					<div class="li_detail" id='contractor'>
					</div>
				</li>
				<!--<li>
					<div class="li_label">
						承办单位
					</div>
					<div class="li_detail" id='contractorUnit'>
					</div>
				</li>-->
				<li>
					<div class="li_label">
						受理时间
					</div>
					<div class="li_detail" id='acceptDate'>
					</div>
				</li>
				<!--<li>
					<div class="li_label">
						案件状态
					</div>
					<div class="li_detail" id='caseState'>
					</div>
				</li>-->
				<li>
					<div class="li_label">
						审判罪名
					</div>
					<div class="li_detail" id='trialCharges'>
					</div>
				</li>
				<div class="li_title1">
					案件详情
				</div>
				<div class="detail" id='caseDetail'>
				</div>
				<div class="li_title1">
					审查意见
				</div>
				<div class="detail">
					日前，江苏省南京市浦口区人民检察院 以涉嫌放火罪批准逮捕犯罪嫌疑人程辉。经审查： 2017年11月至12月间，犯罪嫌疑人张三为发泄自身 情绪，5次前往本市江北新区裕民家园、永丰新寓、明 发滨江三期等小区，在小区单元楼的地下室……
				</div>
				<!--<div class="li_title1">
					嫌疑人家属需配合事宜
				</div>
				<div class="detail" id='familyDetail'>
				</div>-->
				<li>
					<div class="li_label">
						发布时间
					</div>
					<div class="li_detail" id='createTime'>
					</div>
				</li>
			</ul>
		</div>

	</div>

</body>

</html>

<script type="text/javascript ">
	$('.goBack').bind('click', function () {
		window.history.back()
	})
	var getData = function (id) {
		HYIP.ajax({
			url: '/case/detail.action',
			type: 'get',
			data: {
				id: id
			}
		}, function (data) {
			var detail = data.data;

			$('#caseName').text(detail.caseName);
			$('#party').text(detail.party);
			$('#caseType').text(detail.caseType);
			$('#contractor').text(detail.contractor);
			$('#contractorUnit').text(detail.contractorUnit);
			$('#acceptDate').text(detail.acceptDate);
			$('#caseState').text(detail.caseState);
			$('#trialCharges').text(detail.trialCharges);
			$('#caseDetail').text(detail.caseDetail);
			$('#trialCharges').text(detail.trialCharges);
			$('#familyDetail').text(detail.familyDetail);
			$('#createTime').text(detail.createTime);
		});
	}

	// var getData = function (id) {

	// 	$.ajax({
	// 		url: "http://localhost:8080/pkzswm/case/detail.action",
	// 		dataType: 'json', //访问格式，如：json、html等
	// 		timeout: 10000, //请求访问时间
	// 		type: 'GET', //请求访问方式，如post、get
	// 		cache: false, //ajax不缓存，true缓存，false不缓存
	// 		data: {
	// 			id: id
	// 		},
	// 		success: function (data) {
	// 			console.log(data)
	// 			if (data.code == 200) {
	// 				var detail = data.data;
	// 				$('#caseName').text(detail.caseName);
	// 				$('#party').text(detail.party);
	// 				$('#caseType').text(detail.caseType);
	// 				$('#contractor').text(detail.contractor);
	// 				$('#contractorUnit').text(detail.contractorUnit);
	// 				$('#acceptDate').text(detail.acceptDate);
	// 				$('#caseState').text(detail.caseState);
	// 				$('#trialCharges').text(detail.trialCharges);
	// 				$('#caseDetail').text(detail.caseDetail);
	// 				$('#trialCharges').text(detail.trialCharges);
	// 				$('#familyDetail').text(detail.familyDetail);
	// 				$('#createTime').text(detail.createTime);
	// 			} else if (data.code != 200) {
	// 				layer.open({
	// 					title: '提示',
	// 					content: "<span class='red'>" + data.msg + "</span>",
	// 					btn: ['确定']
	// 				});
	// 				return;
	// 			}
	// 		}
	// 	});
	// }

	function GetRequest() {
		var url = location.search; //获取url中"?"符后的字串
		var theRequest = new Object();
		if (url.indexOf("?") != -1) {
			var str = url.substr(1);
			strs = str.split("&");
			for (var i = 0; i < strs.length; i++) {
				theRequest[strs[i].split("=")[0]] = decodeURIComponent(strs[i].split("=")[1]);
			}
		}
		return theRequest;
	}
	getData(GetRequest()['id']);
	console.log(GetRequest()['id'])
</script>